/**
 * 
 */
package sk.stuba.fiit.foo07.genex.dao;

import java.sql.SQLException;
import java.util.ArrayList;

import sk.stuba.fiit.foo07.genex.beans.Answer;

/**
 * @author _mizu_
 * 
 */
public interface AnswerDao {

    /**
     * Method for getting answers.
     * 
     * @param answerID
     *                id of answer
     * @param name
     *                the location of the image, relative to the url argument
     * @return answer
     * 
     */

    public Answer getAnswerByID(Integer answerID) throws SQLException;

    /**
     * Method for getting list of answers.
     * 
     * @param questionID
     *                id of question
     * @param name
     *                the location of the image, relative to the url argument
     * @return list of answers
     * 
     */

    public ArrayList<Answer> getAnswersByQuestionID(Integer questionID)
            throws SQLException;

    /**
     * Method for adding answer to question.
     * 
     * @param questionID
     *                id of question
     * @param toAdd
     *                added answer
     * 
     */

    public void addAnswerToQuestion(Integer questionID, Answer toAdd)
            throws SQLException;

    /**
     * Method for adding answers to question.
     * 
     * @param questionID
     *                id of question
     * @param answers
     *                added answers
     * 
     */

    public void addAnswersToQuestion(Integer questionID,
            ArrayList<Answer> answers) throws SQLException;

    /**
     * Method for updating answers.
     * 
     * @param toUpdate
     *                answer for update
     * 
     */

    public void updateAnswer(Answer toUpdate) throws SQLException;

    /**
     * Method for deleting answer.
     * 
     * @param toDelete
     * 
     */

    public void deleteAnswer(Answer toDelete) throws SQLException;
}
